<h2>Inactive Contracts</h2>
<table id="inactivetable" class="tablesorter">
	<thead>
		<tr>
			<th >Unit</th>
			<th>Start</th>
			<th>End</th>
			<th>Download</th>
		</tr>
	</thead>
	<tbody>
<?php 
		$user="root";
		$password="";
		$database="whitehouse";
		mysql_connect(localhost,$user,$password);
		@mysql_select_db($database) or die( "Unable to select database");
		
	$query = "SELECT * from inactive order by end desc";
		$result = mysql_query($query);
		$i=0;
		while($row = mysql_fetch_array( $result )){
		?>
		<tr>
			<td><?php echo $row['unit_name']?></td>
			<td><?php echo $row['start']?></td>
			<td><?php echo $row['end']?></td>
			<td><a href="download.php?id=<?php echo $row['id']?>" >Download</a></td>
		</tr>
		<?php
		}

?>
	</tbody>
</table>